﻿using MrPP.iot;
using MrPP.Restful;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MrPP.SerriedCabinet
{
    public class ActiveColumnStatusFactory : GDGeek.Singleton<ActiveColumnStatusFactory>, IEventFactory
    {
        public Action<Data> onRecevie
        {
            get;
            set;
        }

        public class Data
        {
            public byte area;
            public int[] status;
        }
        public string type => "activeColumnStatus";

        public void post(string data)
        {
            Data evt = JsonUtility.FromJson<Data>(data);

            onRecevie?.Invoke(evt);
        }
    }
}